#ifndef TERM_H
#define TERM_H

#include <iostream>

class Term
{
public:
    Term();
    Term(int coeff);
    Term(int coeff, int deg);
    Term(const std::string &str);
    int getCoeff() const;
    int getDeg() const;
    void setCoeff(int a);
    void setDeg(int a);
    friend std::istream &operator>>(std::istream &in, Term &);

    friend std::ostream &operator<<(std::ostream &out, const Term &);
    friend Term operator+(const Term &t1, const Term &t2);

private:
    int coeff;
    int deg;
};

#endif // TERM_H
